<template>
  <el-card class="box-card" v-loading="loading">
    <div slot="header" class="clearfix">
      <span>推广网址</span>
    </div>
     <el-table :data="urlsData" v-loading="loading" element-loading-text="给我一点时间" border fit
              highlight-current-row
              style="width: 100%">
      <el-table-column label="编号" type="index" align="center">
      </el-table-column>
      <el-table-column label="域名名称" prop="name" align="center">
      </el-table-column>
       <el-table-column label="域名类别" prop="type" align="center">
        <template slot-scope="{row}">
          {{row.type | toConverter('DOMAIN_TYPE')}}
        </template>
      </el-table-column>
    <el-table-column label="链接地址" prop="domain" align="center">
       <template slot-scope="{row}">
          {{row.type == '1' ? row.domain :row.domain+'.ballbet1.com'}}
        </template>
    </el-table-column>
      <el-table-column label="注册人数" prop="registerNum" align="center">
      </el-table-column>
      <el-table-column label="充值人数" prop="rechargeNum" align="center">
      </el-table-column>
    </el-table>
    <!-- <ul>
      <li v-if="urlsData.url">{{'http://'+urlsData.url + '.test.aibet.com'}}</li>
      <li v-if="urlsData.domain1">{{urlsData.domain1}}</li>
      <li v-if="urlsData.domain2">{{urlsData.domain2}}</li>
      <li v-if="urlsData.domain3">{{urlsData.domain3}}</li>
    </ul> -->
  </el-card>
</template>

<script>
  import {getAgencyDomainListDetail} from "@/services/api/agency";
  // import formFilter from './formFilter'
  import {grid} from '@/build'
  export default {
    name: "agency-url",
    // components:{formFilter},
    mixins:[grid],
    data() {
      return {
        urlsData:[],
        filters:{
          proxyId: this.$store.state.member.member_id
        }
      }
    },
    mounted(){
      this.bindGet(getAgencyDomainListDetail,'urlsData',{
        action:'getGrid',
        sendingData:'filters',
        format: data =>{
          return data.list || []
        }
      })
      this.getAll()

    },
  }
</script>

<style lang="scss">

  .el-table-no-head{
    .el-table__header-wrapper{
      display: none;
    }
  }

</style>
